package wc.vo;

import lombok.*;
import wc.domain.Admin;

/**
 * @ClassName:AdminVO
 * @Author: 鹿建文
 * @Date: 2022/4/9  - 11:54
 * @Describe:
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Builder
public class AdminVO {
    /**
     * 编号
     */
    private Integer id;

    /**
     * 昵称
     */
    private String nikname;

    /**
     * 账号
     */
    private String account;
    /**
     * touxiang
     */
    private String avatar;

    public static AdminVO admin2Adminvo(Admin admin) {
        if (admin == null) {
            return null;
        }
        AdminVO adminVO = new AdminVO();
        adminVO.setId(admin.getId());
        adminVO.setNikname(admin.getNikname());
        adminVO.setAccount(admin.getAccount());
        adminVO.setAvatar(admin.getAvatar());
        return adminVO;
    }


}
